#include <iostream>
using namespace std;

void swap(int* a,int* b)
{
    int temp;
    if(*a<*b)
    {
        cout<<*a<<*b;
        temp=*a;
        *a=*b;
        *b=temp;
        cout<<*a<<*b;
    }
}
int main() {
    int a,b;
    cin>>a>>b;
    swap(&a,&b);
    cout<<a+b<<" "<<a-b<<" "<<a*b<<" "<<a/b<<" "<<a%b;

    return 0;
}